<html>
<head><meta charset="utf-8"><title>JSON Tracking · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html">JSON Tracking</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="237915951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237915951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237915951">(May 08 2021 at 02:12)</a>:</h4>
<p>For the JSON tracking issue (<a href="https://github.com/rust-lang/rust/issues/76578">#76578</a>), I think 'Make the changes to the format suggested in <a href="https://github.com/rust-lang/rust/issues/75114">#75114</a> (review)' is good enough to be checked, as all the changes have either been made or we've decided against, aside from possibly making some stuff a list instead of int-to-item map. Would people be okay with me checking it off? (<span class="user-mention" data-user-id="232545">@Joshua Nelson</span>)</p>



<a name="237949492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237949492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237949492">(May 08 2021 at 11:36)</a>:</h4>
<p>I won't have time to look into it for the next week or so.</p>



<a name="237970160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237970160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237970160">(May 08 2021 at 17:00)</a>:</h4>
<p>Speaking of rustdoc-json, what needs to be done to get closer to stabilization? Of course all the bugs/ICEs must be fixed, but except that?</p>



<a name="237976546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237976546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237976546">(May 08 2021 at 18:47)</a>:</h4>
<p>That's basically what this thread is I think</p>



<a name="237976558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237976558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237976558">(May 08 2021 at 18:48)</a>:</h4>
<p>I don't have time to look into whether the format is what we want right now</p>



<a name="237976933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/237976933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#237976933">(May 08 2021 at 18:54)</a>:</h4>
<p>Alright. I want to start fixing some bugs in the JSON renderer and help to get it forward because I would love to have this stabilized at some time</p>



<a name="238002591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238002591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238002591">(May 09 2021 at 02:50)</a>:</h4>
<p>We still have a checkbox to determine if changes need to be made from use, so I think we should look for at least a handful of people to write things on top of it, from which we can ask them about 'pain points' of the format. I know HeroicKatora has been using it, but I'm not sure if there are yet more.</p>



<a name="238003578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238003578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238003578">(May 09 2021 at 03:11)</a>:</h4>
<p>I do feel a bit concerned about exposing too much of rustdoc's internals in a stable public API. Has that been thought about so far?</p>



<a name="238004012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238004012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238004012">(May 09 2021 at 03:20)</a>:</h4>
<p><span class="user-mention" data-user-id="307537">@Camelid</span> what part of this do you see as internals? the whole point of rustdoc-json-types is that it should be stable and doesn't have a dependency on librustdoc</p>



<a name="238004048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238004048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238004048">(May 09 2021 at 03:20)</a>:</h4>
<p>(if your response is "this is just a lot of info", I don't know if that's really useful to consider, the only alternative is "don't have a JSON backend" which there was already an RFC about)</p>



<a name="238058328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238058328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238058328">(May 09 2021 at 20:09)</a>:</h4>
<p>Well, one thing is that rustdoc_json_types includes unstable items like trait aliases. If trait aliases change significantly or are removed, would we have to make a breaking change to rustdoc_json_types?</p>



<a name="238058621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238058621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238058621">(May 09 2021 at 20:15)</a>:</h4>
<p>I think I just feel worried that it will make refactoring <code>clean</code> harder since it does expose a lot of information.</p>



<a name="238058726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238058726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238058726">(May 09 2021 at 20:16)</a>:</h4>
<p>For that I'd prefer us to be done with the cleanup before talking about stabilizing the JSON format. We have too many things going on at the same time so I'd prefer that the stabilization discussion comes when things have settle down a bit.</p>



<a name="238058748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238058748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238058748">(May 09 2021 at 20:17)</a>:</h4>
<p>(because stabilizing something as big as the JSON format in rustdoc is actually quite a big topic so I prefer for everyone to be fully available)</p>



<a name="238058809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238058809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238058809">(May 09 2021 at 20:18)</a>:</h4>
<blockquote>
<p>For that I'd prefer us to be done with the cleanup before talking about stabilizing the JSON format.</p>
</blockquote>
<p>I'm not sure if we'll ever be "done" with the cleanup though; it's a continuous process.</p>



<a name="238059214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238059214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238059214">(May 09 2021 at 20:25)</a>:</h4>
<p>E.g., fixing bugs in HRTB rendering may require introducing a new <code>clean</code> type that might be a breaking change to rustdoc-json.</p>



<a name="238061270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238061270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238061270">(May 09 2021 at 20:59)</a>:</h4>
<p><span class="user-mention" data-user-id="307537">@Camelid</span> hmm it's a good point - I wonder if we should separate info about stable features from info about unstable ones?</p>



<a name="238061279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238061279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238061279">(May 09 2021 at 20:59)</a>:</h4>
<p>Not sure how that could work</p>



<a name="238069143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238069143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238069143">(May 09 2021 at 23:18)</a>:</h4>
<p>First, probably bad idea: There's a top-level stable/unstable flag, if stable it only includes stable stuff, if unstable it adds unstable stuff. Unstable JSON follows the same 'allowed to break stuff' as rustc unstable. Moving things to stable requires a JSON version bump if it's breaking, otherwise not (Same semver rules as we currently follow for everything).</p>



<a name="238072079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238072079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238072079">(May 10 2021 at 00:13)</a>:</h4>
<blockquote>
<p>E.g., fixing bugs in HRTB rendering may require introducing a new <code>clean</code> type that might be a breaking change to rustdoc-json.</p>
</blockquote>
<p>This misunderstands the point I think - clean and rustdoc-json are completely separate. It's ok to add info to clean that's not present in JSON. It's also fine to change the clean AST all around as long as the JSON output is the same.</p>



<a name="238276396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/JSON%20Tracking/near/238276396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/JSON.20Tracking.html#238276396">(May 11 2021 at 09:19)</a>:</h4>
<p>In terms of how close the format is to being ready (baring how we want to model language evolution), we still nead to fix how we deal with names. Eg</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">mod</span> <span class="nn">foo</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">struct</span> <span class="nc">HiddenName</span><span class="p">;</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">foo</span>::<span class="n">HiddenName</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Name1</span><span class="p">;</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">foo</span>::<span class="n">HiddenName</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Name2</span><span class="p">;</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">convert</span><span class="p">(</span><span class="n">x</span>: <span class="nc">Name1</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Name2</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>This currently ICEs. (And the html output isn't good either, as we generate 2 pages for <code>Name1</code> and <code>Name2</code>, with no anotation that they are the same</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>